package com.starsoft.frame.base.bean;

import java.sql.Blob;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * BaseAttachment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_attachment")
public class BaseAttachment implements java.io.Serializable {

	// Fields

	private Integer id;
	private Blob content;
	private String fileName;
	private Timestamp createTime;

	// Constructors

	/** default constructor */
	public BaseAttachment() {
	}

	/** full constructor */
	public BaseAttachment(Blob content, String fileName, Timestamp createTime) {
		this.content = content;
		this.fileName = fileName;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "content")
	public Blob getContent() {
		return this.content;
	}

	public void setContent(Blob content) {
		this.content = content;
	}

	@Column(name = "fileName", length = 100)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}